# -*- coding: utf-8 -*-
#!/usr/bin/python

from flask import Flask, request, render_template
import graphcreatmodule
import json
  
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
    return render_template('index.html')

@app.route('/<customer>', methods=['GET'])
def User(customer):
    qs=request.args.get("qs")
    graph_title_graph_name_dict=graphcreatmodule.graphcreat(customer,qs)
    return render_template('customer.html',graph_title_graph_name_dict=graph_title_graph_name_dict,customer=customer)

if __name__ == '__main__':
    app.run(host='0.0.0.0',port=8001,debug=True)